# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=jsonrpc-glib
pkgver=3.30.0
pkgrel=1
pkgdesc="A JSON-RPC library for GLib"
url="https://gitlab.gnome.org/GNOME/jsonrpc-glib"
arch=(x86_64)
license=(LGPL)
depends=(json-glib)
makedepends=(git meson vala gobject-introspection gtk-doc)
_commit=b168ee02395a64345ba14b1c463bf30205db9a75  # tags/3.30.0^0
source=("git+https://gitlab.gnome.org/GNOME/jsonrpc-glib.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D enable_gtk_doc=true
  ninja -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
